package vn.com.bookstore.domain.model;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @author QuangMinh
 */
public class Customer implements Serializable {
	private static final long serialVersionUID = 1L;
	private Integer id;
	private String firstname;
	private String lastname;
	private String middle;
	private Date birthday;
	private String gender;
	private String address;
	private String phone;
	private String country;
	private Double pointCart;
	private int accountId;
	private boolean active;
	private String email;
	
	public Customer() {
	}

	public Customer(Integer id) {
		this.id = id;
	}

	public Customer(Integer id, String firstname, String lastname,
			String middle, Date birthday, String gender, String address,
			int accountId, boolean active) {
		this.id = id;
		this.firstname = firstname;
		this.lastname = lastname;
		this.middle = middle;
		this.birthday = birthday;
		this.gender = gender;
		this.address = address;
		this.accountId = accountId;
		this.active = active;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getFirstname() {
		return firstname;
	}

	public void setFirstname(String firstname) {
		this.firstname = firstname;
	}

	public String getLastname() {
		return lastname;
	}

	public void setLastname(String lastname) {
		this.lastname = lastname;
	}

	public String getMiddle() {
		return middle;
	}

	public void setMiddle(String middle) {
		this.middle = middle;
	}

	public Date getBirthday() {
		return birthday;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

	public String getGender() {
		return gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getCountry() {
		return country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	public Double getPointCart() {
		return pointCart;
	}

	public void setPointCart(Double pointCart) {
		this.pointCart = pointCart;
	}

	public int getAccountId() {
		return accountId;
	}

	public void setAccountId(int accountId) {
		this.accountId = accountId;
	}

	public boolean getActive() {
		return active;
	}

	public void setActive(boolean active) {
		this.active = active;
	}

	@Override
	public int hashCode() {
		int hash = 0;
		hash += (id != null ? id.hashCode() : 0);
		return hash;
	}

	@Override
	public boolean equals(Object object) {
		// TODO: Warning - this method won't work in the case the id fields are
		// not set
		if (!(object instanceof Customer)) {
			return false;
		}
		Customer other = (Customer) object;
		if ((this.id == null && other.id != null)
				|| (this.id != null && !this.id.equals(other.id))) {
			return false;
		}
		return true;
	}

	@Override
	public String toString() {
		return "vn.com.iflex.Customer[ id=" + id + " ]";
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

}
